/*@ File Name : opengl.h
  @ Date : 18/11/2011
  @ Author : Guillaume Collombet, Ulysse Mensa, Sylvain Chambe

Fireworks simulation projet
Copyright (C) 2011 Guillaume Collombet, Ulysse Mensa, Sylvain Chambe

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

You can contact us by sending mail at fireworks-simulation-project@googlecode.com*/

#if !defined(_OPENGL_H)
#define _OPENGL_H

#ifdef _WIN32
	#include <Windows.h>
#endif

#include <GL/glew.h>
#include <stdio.h>
#include <SDL/SDL.h>
#include <SDL/SDL_image.h>
#include "const.h"
#include "vector3.h"
#include "color.h"

 enum e_LINES_DRAW_MODE
{
	LINES_DRAW_MODE_SEPARATE = 0,
	LINES_DRAW_MODE_CONTIGUOUS = 1
} typedef LINES_DRAW_MODE;

SDL_Surface* FlipSurface(SDL_Surface * surface);

void OpenGL_Init(int width,int height);
unsigned int OpenGL_LoadTexture(const char * filename,BOOL useMipMap);

/*void OpenGL_DrawSprite(const Sprite* sprite);
void OpenGL_DrawSprites(const Sprite* sprite, const Vector3f** positions, int lenght);*/
void OpenGL_DrawLines(const Vector3f* dots, const Color* colors, int* lineWidth, int lenght, LINES_DRAW_MODE lineDrawMode);
void OpenGL_DrawLine(const Vector3f* dot1,const Vector3f* dot2, const Color* color, int lineWidth);
void OpenGL_DrawMode(int mode);
void OpenGL_InitFrame();
void OpenGL_EndFrame();
void OpenGL_LookAt(const Vector3f* position, const Vector3f* target);


#endif  /*_OPENGL_H*/
